home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
util
/
cli
/
gengui21.lha
/
Gengui2.1
/
Examples
/
frame.gui
< prev
next >
Wrap
Text File
|
1995-10-12
|
5KB
|
210 lines
#c_source
UWORD chip Tool1Data[] =
{
/* Plane 0 */
0x0000,0x0000,0x0000,0x0400,0x0000,0x0000,0x0000,0x0C00,
0x0000,0x0000,0x0000,0x0C00,0x0000,0x0000,0x0000,0x0C00,
0x0000,0x0000,0x0000,0x0C00,0x0000,0x0000,0x0000,0x0C00,
0x03F0,0x0FFF,0xE000,0x0C00,0x0208,0x3000,0x1C00,0x0C00,
0x0207,0xC000,0x0380,0x0C00,0x0200,0x0000,0x0060,0x0C00,
0x0200,0x0000,0x0010,0x0C00,0x0200,0x0000,0x0008,0x0C00,
0x0207,0xC000,0x1FC4,0x0C00,0x0208,0x2000,0x2032,0x0C00,
0x03F0,0x1800,0xC00D,0x0C00,0x0000,0x0603,0x0003,0x0C00,
0x0000,0x0202,0x0000,0x0C00,0x0000,0x0202,0x0000,0x0C00,
0x0000,0x0202,0x0000,0x0C00,0x0000,0x03FE,0x0000,0x0C00,
0x0000,0x0000,0x0000,0x0C00,0x7FFF,0xFFFF,0xFFFF,0xFC00,
/* Plane 1 */
0xFFFF,0xFFFF,0xFFFF,0xF800,0xD555,0x5555,0x5555,0x5000,
0xD555,0x5555,0x5555,0x5000,0xD555,0x5555,0x5555,0x5000,
0xD555,0x5555,0x5555,0x5000,0xD555,0x5555,0x5555,0x5000,
0xD405,0x5000,0x1555,0x5000,0xD405,0x4000,0x0155,0x5000,
0xD400,0x0000,0x0055,0x5000,0xD400,0x0000,0x0015,0x5000,
0xD400,0x0000,0x0005,0x5000,0xD400,0x0000,0x0005,0x5000,
0xD400,0x0000,0x0001,0x5000,0xD405,0x4000,0x1541,0x5000,
0xD405,0x4000,0x1550,0x5000,0xD555,0x5000,0x5554,0x5000,
0xD555,0x5401,0x5555,0x5000,0xD555,0x5401,0x5555,0x5000,
0xD555,0x5401,0x5555,0x5000,0xD555,0x5401,0x5555,0x5000,
0xD555,0x5555,0x5555,0x5000,0x8000,0x0000,0x0000,0x0000,
};
struct Image Tool1 =
{
0, 0, /* Upper left corner */
54, 22, 2, /* Width, Height, Depth */
Tool1Data, /* Image data */
0x0003, 0x0000, /* PlanePick, PlaneOnOff */
NULL /* Next image */
};
UWORD chip Tool2Data[] =
{
/* Plane 0 */
0x0000,0x0000,0x0000,0x0400,0x0000,0x0000,0x0000,0x0C00,
0x0000,0x0000,0x0000,0x0C00,0x0000,0x0000,0x0000,0x0C00,
0x0000,0x0000,0x0000,0x0C00,0x0000,0x0000,0x0000,0x0C00,
0x03F0,0x0FFF,0xE000,0x0C00,0x03F8,0x3FFF,0xFC00,0x0C00,
0x03FF,0xFFFF,0xFF80,0x0C00,0x03FF,0xFFFF,0xFFE0,0x0C00,
0x03FF,0xFFFF,0xFFF0,0x0C00,0x03FF,0xFFFF,0xFFF8,0x0C00,
0x03FF,0xFFFF,0xFFFC,0x0C00,0x03F8,0x3FFF,0xE03E,0x0C00,
0x03F0,0x1FFF,0xC00F,0x0C00,0x0000,0x07FF,0x0003,0x0C00,
0x0000,0x03FE,0x0000,0x0C00,0x0000,0x03FE,0x0000,0x0C00,
0x0000,0x03FE,0x0000,0x0C00,0x0000,0x03FE,0x0000,0x0C00,
0x0000,0x0000,0x0000,0x0C00,0x7FFF,0xFFFF,0xFFFF,0xFC00,
/* Plane 1 */
0xFFFF,0xFFFF,0xFFFF,0xF800,0xD555,0x5555,0x5555,0x5000,
0xD555,0x5555,0x5555,0x5000,0xD555,0x5555,0x5555,0x5000,
0xD555,0x5555,0x5555,0x5000,0xD555,0x5555,0x5555,0x5000,
0xD405,0x5000,0x1555,0x5000,0xD405,0x4000,0x0155,0x5000,
0xD400,0x0000,0x0055,0x5000,0xD400,0x0000,0x0015,0x5000,
0xD400,0x0000,0x0005,0x5000,0xD400,0x0000,0x0005,0x5000,
0xD400,0x0000,0x0001,0x5000,0xD405,0x4000,0x1541,0x5000,
0xD405,0x4000,0x1550,0x5000,0xD555,0x5000,0x5554,0x5000,
0xD555,0x5401,0x5555,0x5000,0xD555,0x5401,0x5555,0x5000,
0xD555,0x5401,0x5555,0x5000,0xD555,0x5401,0x5555,0x5000,
0xD555,0x5555,0x5555,0x5000,0x8000,0x0000,0x0000,0x0000,
};
struct Image Tool2 =
{
0, 0, /* Upper left corner */
54, 22, 2, /* Width, Height, Depth */
Tool2Data, /* Image data */
0x0003, 0x0000, /* PlanePick, PlaneOnOff */
NULL /* Next image */
};
#include "backfillhook.h"
struct Hook pat1={{0,0},HookFunc,0,COLOR(0,0)};
struct Hook pat2={{0,0},HookFunc,0,COLOR(1,2)};
struct Hook pat3={{0,0},HookFunc,0,COLOR(2,3)};
#define TestPro XFrame
int __stdargs disable(struct IntuiMessage * );
int __stdargs stophook(struct IntuiMessage * );
#end_source
ProjectName XFrame
HBox
backfill &pat1
xspace 10
yspace 10
vbox
hrel 2
xspace 4
yspace 4
frame raised
backfill &pat2
button
text "Disable"
id 1
hook disable
end
button
text "Enable"
id 2
hook disable
end
button
text "003"
id 3
end
button
text "004"
id 4
end
hbox
end
plaintext
stdline 2
text "Stop/Remove GUI\nfor 3 seconds :"
flags GG_VCentered
end
button
text "Stop"
id 5
hook stophook
end
button
text "Remove"
id 6
hook stophook
end
end
bar
vbox
GfxButton
minvchar 2
image &Tool1
image &Tool2
flags GG_HCentered,GG_VCentered
activation GACT_RELVERIFY,GACT_TOGGLESELECT
id 7
end
vbox
frame recessed
xspace 0
yspace 0
plaintext
text "%C2This %C1is %Ia\n"
text "%i%U%c3Test"
flags GG_HCentered,GG_VCentered
end
end
end
end
#c_source
extern struct Window *win;
int __stdargs disable(struct IntuiMessage *msg )
{
GG_SetGadgetAttrs(XFrame_Gadgets[XFrame_7],win,NULL,
GA_Disabled,GetGadget(msg)->GadgetID==1,TAG_DONE);
return 1;
}
int __stdargs stophook(struct IntuiMessage *msg )
{
if(GetGadget(msg)->GadgetID==5) {
GG_StopGui(&XFrame);
GG_ClearWindow(win);
Delay(50*3);
GG_RenderGui(win,&XFrame);
} else {
GG_FreeGui(&XFrame);
GG_ClearWindow(win);
Delay(50*3);
GG_RenderGui(win,&XFrame);
}
return 1;
}
#end_source